#include "contrlDevices.h"

int bathroomLightOpen()
{
	digitalWrite(LED1_PIN,LOW);
}

int bathroomLightClose()
{
	digitalWrite(LED1_PIN,HIGH);
}

int bathroomLightInit()
{
	pinMode(LED1_PIN,OUTPUT);
	digitalWrite(LED1_PIN,HIGH);

}

contrl bathroomLight = {
	.devicesName = "bathroomLight",
	.open = bathroomLightOpen,
	.close = bathroomLightClose,
	.deviceInit = bathroomLightInit
};

contrl *addBathroomLightToDeviceLink(contrl *phead)
{
	if(phead != NULL) bathroomLight.next = phead;
	return &bathroomLight;
}